package com.example.sunsg.okhttptest.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by sunsg on 16/3/9.
 */
public class SpotEditItemImage implements SpotEditItem.SpotEditItemInterface, Parcelable {
    private LocalImageItemImage image;
    private String description;
    public SpotEditItemImage() {
    }

    public SpotEditItemImage(LocalImageItemImage image) {
        this.image = image;
    }

    public SpotEditItemImage(LocalImageItemImage image, String description) {
        this.image = image;
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }



    public LocalImageItemImage getImage() {
        return image;
    }

    public void setImage(LocalImageItemImage image) {
        this.image = image;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.image, 0);
        dest.writeString(this.description);
    }

    protected SpotEditItemImage(Parcel in) {
        this.image = in.readParcelable(LocalImageItemImage.class.getClassLoader());
        this.description = in.readString();
    }

    public static final Creator<SpotEditItemImage> CREATOR = new Creator<SpotEditItemImage>() {
        public SpotEditItemImage createFromParcel(Parcel source) {
            return new SpotEditItemImage(source);
        }

        public SpotEditItemImage[] newArray(int size) {
            return new SpotEditItemImage[size];
        }
    };
}
